/*
 * BM8563.h
 *
 *  Created on: Aug 23, 2024
 *      Author: zhu
 */

#ifndef EXLIB_BM8563_H_
#define EXLIB_BM8563_H_

#include <stdbool.h>
#include <stdint.h>
#include "hal_i2c.h"


typedef struct{
    uint8_t rtcSec;
    uint8_t rtcMin;
    uint8_t rtcHour;
    uint8_t rtcDate;
    uint8_t rtcWeek;
    uint8_t rtcMonth;
    uint8_t rtcYear;
} RTC_TIME_t;

void BM8563_Init(struct iic_type *iic_pt);
uint8_t BM8563_RTCTimeVaild(void);
int8_t BM8563_RTCSet(uint8_t *time_base);
int8_t BM8563_RTCGet(RTC_TIME_t *time_db);
#endif /* EXLIB_BM8563_H_ */
